!(function (e, t) {
  'object' == typeof exports && 'undefined' != typeof module
    ? t(exports, require('preact'), require('preact/hooks'))
    : 'function' == typeof define && define.amd
    ? define(['exports', 'preact', 'preact/hooks'], t)
    : t(((e || self).preactCompat = {}), e.preact, e.preactHooks);
})(this, function (t, c, i) {
  function o(e, t) {
    for (var n in t) e[n] = t[n];
    return e;
  }
  function u(e, t) {
    for (var n in e) if ('__source' !== n && !(n in t)) return !0;
    for (var r in t) if ('__source' !== r && e[r] !== t[r]) return !0;
    return !1;
  }
  function l(e, t) {
    return (e === t && (0 !== e || 1 / e == 1 / t)) || (e != e && t != t);
  }
  function e(e) {
    this.props = e;
  }
  function n(t, r) {
    function n(e) {
      var t = this.props.ref,
        n = t == e.ref;
      return (
        !n && t && (t.call ? t(null) : (t.current = null)),
        r ? !r(this.props, e) || !n : u(this.props, e)
      );
    }
    function e(e) {
      return (this.shouldComponentUpdate = n), c.createElement(t, e);
    }
    return (
      (e.displayName = 'Memo(' + (t.displayName || t.name) + ')'),
      (e.prototype.isReactComponent = !0),
      (e.__f = !0),
      e
    );
  }
  ((e.prototype = new c.Component()).isPureReactComponent = !0),
    (e.prototype.shouldComponentUpdate = function (e, t) {
      return u(this.props, e) || u(this.state, t);
    });
  var r = c.options.__b,
    I =
      ((c.options.__b = function (e) {
        e.type &&
          e.type.__f &&
          e.ref &&
          ((e.props.ref = e.ref), (e.ref = null)),
          r && r(e);
      }),
      ('undefined' != typeof Symbol &&
        Symbol.for &&
        Symbol.for('react.forward_ref')) ||
        3911);
  function a(n) {
    function e(e) {
      var t = o({}, e);
      return delete t.ref, n(t, e.ref || null);
    }
    return (
      (e.$$typeof = I),
      ((e.render = e).prototype.isReactComponent = e.__f = !0),
      (e.displayName = 'ForwardRef(' + (n.displayName || n.name) + ')'),
      e
    );
  }
  function _(e, t) {
    return null == e ? null : c.toChildArray(c.toChildArray(e).map(t));
  }
  var f = {
      map: _,
      forEach: _,
      count: function (e) {
        return e ? c.toChildArray(e).length : 0;
      },
      only: function (e) {
        e = c.toChildArray(e);
        if (1 !== e.length) throw 'Children.only';
        return e[0];
      },
      toArray: c.toChildArray,
    },
    T = c.options.__e,
    s =
      ((c.options.__e = function (e, t, n, r) {
        if (e.then)
          for (var o, u = t; (u = u.__); )
            if ((o = u.__c) && o.__c)
              return (
                null == t.__e && ((t.__e = n.__e), (t.__k = n.__k)), o.__c(e, t)
              );
        T(e, t, n, r);
      }),
      c.options.unmount);
  function p() {
    (this.__u = 0), (this.t = null), (this.__b = null);
  }
  function d(e) {
    var t = e.__.__c;
    return t && t.__a && t.__a(e);
  }
  function m(t) {
    var n, r, o;
    function e(e) {
      if (
        (n ||
          (n = t()).then(
            function (e) {
              r = e.default || e;
            },
            function (e) {
              o = e;
            }
          ),
        o)
      )
        throw o;
      if (r) return c.createElement(r, e);
      throw n;
    }
    return (e.displayName = 'Lazy'), (e.__f = !0), e;
  }
  function h() {
    (this.u = null), (this.o = null);
  }
  (c.options.unmount = function (e) {
    var t = e.__c;
    t && t.__R && t.__R(), t && !0 === e.__h && (e.type = null), s && s(e);
  }),
    ((p.prototype = new c.Component()).__c = function (e, t) {
      function n() {
        i || ((i = !0), (r.__R = null), u ? u(l) : l());
      }
      var r = t.__c,
        o = this,
        u = (null == o.t && (o.t = []), o.t.push(r), d(o.__v)),
        i = !1,
        l =
          ((r.__R = n),
          function () {
            var e, t;
            if (!--o.__u)
              for (
                o.state.__a &&
                  ((e = o.state.__a),
                  (o.__v.__k[0] = (function t(e, n, r) {
                    return (
                      e &&
                        ((e.__v = null),
                        (e.__k =
                          e.__k &&
                          e.__k.map(function (e) {
                            return t(e, n, r);
                          })),
                        e.__c &&
                          e.__c.__P === n &&
                          (e.__e && r.insertBefore(e.__e, e.__d),
                          (e.__c.__e = !0),
                          (e.__c.__P = r))),
                      e
                    );
                  })(e, e.__c.__P, e.__c.__O))),
                  o.setState({ __a: (o.__b = null) });
                (t = o.t.pop());

              )
                t.forceUpdate();
          }),
        t = !0 === t.__h;
      o.__u++ || t || o.setState({ __a: (o.__b = o.__v.__k[0]) }), e.then(n, n);
    }),
    (p.prototype.componentWillUnmount = function () {
      this.t = [];
    }),
    (p.prototype.render = function (e, t) {
      this.__b &&
        (this.__v.__k &&
          ((r = document.createElement('div')),
          (n = this.__v.__k[0].__c),
          (this.__v.__k[0] = (function t(e, n, r) {
            return (
              e &&
                (e.__c &&
                  e.__c.__H &&
                  (e.__c.__H.__.forEach(function (e) {
                    'function' == typeof e.__c && e.__c();
                  }),
                  (e.__c.__H = null)),
                null != (e = o({}, e)).__c &&
                  (e.__c.__P === r && (e.__c.__P = n), (e.__c = null)),
                (e.__k =
                  e.__k &&
                  e.__k.map(function (e) {
                    return t(e, n, r);
                  }))),
              e
            );
          })(this.__b, r, (n.__O = n.__P)))),
        (this.__b = null));
      var n,
        r = t.__a && c.createElement(c.Fragment, null, e.fallback);
      return (
        r && (r.__h = null),
        [c.createElement(c.Fragment, null, t.__a ? null : e.children), r]
      );
    });
  function y(e, t, n) {
    if (
      (++n[1] === n[0] && e.o.delete(t),
      e.props.revealOrder && ('t' !== e.props.revealOrder[0] || !e.o.size))
    )
      for (n = e.u; n; ) {
        for (; 3 < n.length; ) n.pop()();
        if (n[1] < n[0]) break;
        e.u = n = n[2];
      }
  }
  function j(e) {
    return (
      (this.getChildContext = function () {
        return e.context;
      }),
      e.children
    );
  }
  function V(e) {
    var n = this,
      t = e.i;
    (n.componentWillUnmount = function () {
      c.render(null, n.l), (n.l = null), (n.i = null);
    }),
      n.i && n.i !== t && n.componentWillUnmount(),
      n.l ||
        ((n.i = t),
        (n.l = {
          nodeType: 1,
          parentNode: t,
          childNodes: [],
          appendChild: function (e) {
            this.childNodes.push(e), n.i.appendChild(e);
          },
          insertBefore: function (e, t) {
            this.childNodes.push(e), n.i.appendChild(e);
          },
          removeChild: function (e) {
            this.childNodes.splice(this.childNodes.indexOf(e) >>> 1, 1),
              n.i.removeChild(e);
          },
        })),
      c.render(c.createElement(j, { context: n.context }, e.__v), n.l);
  }
  function v(e, t) {
    e = c.createElement(V, { __v: e, i: t });
    return (e.containerInfo = t), e;
  }
  ((h.prototype = new c.Component()).__a = function (n) {
    var r = this,
      o = d(r.__v),
      u = r.o.get(n);
    return (
      u[0]++,
      function (e) {
        function t() {
          r.props.revealOrder ? (u.push(e), y(r, n, u)) : e();
        }
        o ? o(t) : t();
      }
    );
  }),
    (h.prototype.render = function (e) {
      (this.u = null), (this.o = new Map());
      var t = c.toChildArray(e.children);
      e.revealOrder && 'b' === e.revealOrder[0] && t.reverse();
      for (var n = t.length; n--; ) this.o.set(t[n], (this.u = [1, 0, this.u]));
      return e.children;
    }),
    (h.prototype.componentDidUpdate = h.prototype.componentDidMount =
      function () {
        var n = this;
        this.o.forEach(function (e, t) {
          y(n, t, e);
        });
      });
  var b =
      ('undefined' != typeof Symbol &&
        Symbol.for &&
        Symbol.for('react.element')) ||
      60103,
    M =
      /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,
    W = /^on(Ani|Tra|Tou|BeforeInp|Compo)/,
    H = /[A-Z0-9]/g,
    $ = 'undefined' != typeof document;
  function C(e, t, n) {
    return (
      null == t.__k && (t.textContent = ''),
      c.render(e, t),
      'function' == typeof n && n(),
      e ? e.__c : null
    );
  }
  function E(e, t, n) {
    return c.hydrate(e, t), 'function' == typeof n && n(), e ? e.__c : null;
  }
  (c.Component.prototype.isReactComponent = {}),
    [
      'componentWillMount',
      'componentWillReceiveProps',
      'componentWillUpdate',
    ].forEach(function (t) {
      Object.defineProperty(c.Component.prototype, t, {
        configurable: !0,
        get: function () {
          return this['UNSAFE_' + t];
        },
        set: function (e) {
          Object.defineProperty(this, t, {
            configurable: !0,
            writable: !0,
            value: e,
          });
        },
      });
    });
  var g = c.options.event;
  function B() {}
  function z() {
    return this.cancelBubble;
  }
  function q() {
    return this.defaultPrevented;
  }
  var S,
    Y = {
      enumerable: !(c.options.event = function (e) {
        return (
          ((e = g ? g(e) : e).persist = B),
          (e.isPropagationStopped = z),
          (e.isDefaultPrevented = q),
          (e.nativeEvent = e)
        );
      }),
      configurable: !0,
      get: function () {
        return this.class;
      },
    },
    O = c.options.vnode,
    R =
      ((c.options.vnode = function (e) {
        if ('string' == typeof e.type) {
          var t = e,
            n,
            r,
            o = t.props,
            u = t.type,
            i = {};
          for (n in o) {
            var l,
              a = o[n];
            ('value' === n && 'defaultValue' in o && null == a) ||
              ($ && 'children' === n && 'noscript' === u) ||
              'class' === n ||
              'className' === n ||
              ((l = n.toLowerCase()),
              'defaultValue' === n && 'value' in o && null == o.value
                ? (n = 'value')
                : 'download' === n && !0 === a
                ? (a = '')
                : 'ondoubleclick' === l
                ? (n = 'ondblclick')
                : 'onchange' !== l ||
                  ('input' !== u && 'textarea' !== u) ||
                  ((r = o.type),
                  ('undefined' != typeof Symbol && 'symbol' == typeof Symbol()
                    ? /fil|che|rad/
                    : /fil|che|ra/
                  ).test(r))
                ? 'onfocus' === l
                  ? (n = 'onfocusin')
                  : 'onblur' === l
                  ? (n = 'onfocusout')
                  : W.test(n)
                  ? (n = l)
                  : -1 === u.indexOf('-') && M.test(n)
                  ? (n = n.replace(H, '-$&').toLowerCase())
                  : null === a && (a = void 0)
                : (l = n = 'oninput'),
              'oninput' === l && i[(n = l)] && (n = 'oninputCapture'),
              (i[n] = a));
          }
          'select' == u &&
            i.multiple &&
            Array.isArray(i.value) &&
            (i.value = c.toChildArray(o.children).forEach(function (e) {
              e.props.selected = -1 != i.value.indexOf(e.props.value);
            })),
            'select' == u &&
              null != i.defaultValue &&
              (i.value = c.toChildArray(o.children).forEach(function (e) {
                e.props.selected = i.multiple
                  ? -1 != i.defaultValue.indexOf(e.props.value)
                  : i.defaultValue == e.props.value;
              })),
            o.class && !o.className
              ? ((i.class = o.class), Object.defineProperty(i, 'className', Y))
              : ((o.className && !o.class) || (o.class && o.className)) &&
                (i.class = i.className = o.className),
            (t.props = i);
        }
        (e.$$typeof = b), O && O(e);
      }),
      c.options.__r),
    N =
      ((c.options.__r = function (e) {
        R && R(e), (S = e.__c);
      }),
      c.options.diffed),
    k =
      ((c.options.diffed = function (e) {
        N && N(e);
        var t = e.props,
          n = e.__e;
        null != n &&
          'textarea' === e.type &&
          'value' in t &&
          t.value !== n.value &&
          (n.value = null == t.value ? '' : t.value),
          (S = null);
      }),
      {
        ReactCurrentDispatcher: {
          current: {
            readContext: function (e) {
              return S.__n[e.__c].props.value;
            },
          },
        },
      }),
    P = '17.0.2';
  function x(e) {
    return c.createElement.bind(null, e);
  }
  function A(e) {
    return !!e && e.$$typeof === b;
  }
  function w(e) {
    return A(e) && e.type === c.Fragment;
  }
  function U(e) {
    return A(e) ? c.cloneElement.apply(null, arguments) : e;
  }
  function F(e) {
    return !!e.__k && (c.render(null, e), !0);
  }
  function L(e) {
    return (e && (e.base || (1 === e.nodeType && e))) || null;
  }
  function Z(e, t) {
    return e(t);
  }
  function G(e, t) {
    return e(t);
  }
  var J = c.Fragment;
  function D(e) {
    e();
  }
  function K(e) {
    return e;
  }
  function Q() {
    return [!1, D];
  }
  var X = i.useLayoutEffect,
    ee = A;
  function te(e, t) {
    var n = t(),
      r = i.useState({ h: { __: n, v: t } }),
      o = r[0].h,
      u = r[1];
    return (
      i.useLayoutEffect(
        function () {
          (o.__ = n), (o.v = t), l(o.__, t()) || u({ h: o });
        },
        [e, n, t]
      ),
      i.useEffect(
        function () {
          return (
            l(o.__, o.v()) || u({ h: o }),
            e(function () {
              l(o.__, o.v()) || u({ h: o });
            })
          );
        },
        [e]
      ),
      n
    );
  }
  var ne = {
    useState: i.useState,
    useId: i.useId,
    useReducer: i.useReducer,
    useEffect: i.useEffect,
    useLayoutEffect: i.useLayoutEffect,
    useInsertionEffect: X,
    useTransition: Q,
    useDeferredValue: K,
    useSyncExternalStore: te,
    startTransition: D,
    useRef: i.useRef,
    useImperativeHandle: i.useImperativeHandle,
    useMemo: i.useMemo,
    useCallback: i.useCallback,
    useContext: i.useContext,
    useDebugValue: i.useDebugValue,
    version: P,
    Children: f,
    render: C,
    hydrate: E,
    unmountComponentAtNode: F,
    createPortal: v,
    createElement: c.createElement,
    createContext: c.createContext,
    createFactory: x,
    cloneElement: U,
    createRef: c.createRef,
    Fragment: c.Fragment,
    isValidElement: A,
    isElement: ee,
    isFragment: w,
    findDOMNode: L,
    Component: c.Component,
    PureComponent: e,
    memo: n,
    forwardRef: a,
    flushSync: G,
    unstable_batchedUpdates: Z,
    StrictMode: J,
    Suspense: p,
    SuspenseList: h,
    lazy: m,
    __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: k,
  };
  Object.defineProperty(t, 'Component', {
    enumerable: !0,
    get: function () {
      return c.Component;
    },
  }),
    Object.defineProperty(t, 'Fragment', {
      enumerable: !0,
      get: function () {
        return c.Fragment;
      },
    }),
    Object.defineProperty(t, 'createContext', {
      enumerable: !0,
      get: function () {
        return c.createContext;
      },
    }),
    Object.defineProperty(t, 'createElement', {
      enumerable: !0,
      get: function () {
        return c.createElement;
      },
    }),
    Object.defineProperty(t, 'createRef', {
      enumerable: !0,
      get: function () {
        return c.createRef;
      },
    }),
    (t.Children = f),
    (t.PureComponent = e),
    (t.StrictMode = J),
    (t.Suspense = p),
    (t.SuspenseList = h),
    (t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = k),
    (t.cloneElement = U),
    (t.createFactory = x),
    (t.createPortal = v),
    (t.default = ne),
    (t.findDOMNode = L),
    (t.flushSync = G),
    (t.forwardRef = a),
    (t.hydrate = E),
    (t.isElement = ee),
    (t.isFragment = w),
    (t.isValidElement = A),
    (t.lazy = m),
    (t.memo = n),
    (t.render = C),
    (t.startTransition = D),
    (t.unmountComponentAtNode = F),
    (t.unstable_batchedUpdates = Z),
    (t.useDeferredValue = K),
    (t.useInsertionEffect = X),
    (t.useSyncExternalStore = te),
    (t.useTransition = Q),
    (t.version = P),
    Object.keys(i).forEach(function (e) {
      'default' === e ||
        t.hasOwnProperty(e) ||
        Object.defineProperty(t, e, {
          enumerable: !0,
          get: function () {
            return i[e];
          },
        });
    });
});
